<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="example-1">
        <button v-on:click="counter += 1">clckme</button>
        <p>the button above has clcked{{counter}}</p>



        <button v-on:click="green">click2</button>


        
    </div>

    <script type="text/javascript">
        var app = new Vue({
            el: '#example-1',
            data: {
                counter: 0
            },
            methods: {
                green: function(event){
                    alert('hello')
                    if (event){
                        alert(event.target.tagName)
                    }
                }
            },
        })
    </script>

</body>

</html>